package vn.sunnet.game.SinhTon.object;

import vn.sunnet.game.SinhTon.global.Assets;

import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Rectangle;


public class StageGame {

	private int numberStage;
	private boolean isLock;
	private TextureRegion texture;
	private Rectangle bounds;

	public StageGame(int numberStage, boolean isLock) {
		bounds = new Rectangle();
		bounds.width = 158;
		bounds.height = 138;
		this.numberStage = numberStage;
		this.isLock = isLock;
		if (numberStage > 3)
			bounds.y = 104;
		else
			bounds.y = 245;

		switch (numberStage) {
		case 1:
			bounds.x = 139;
			break;

		case 2:
			bounds.x = 315;
			break;
		case 3:
			bounds.x = 491;
			break;
		case 4:
			bounds.x = 139;
			break;
		case 5:
			bounds.x = 315;
			break;
		case 6:
			bounds.x = 491;
			break;
		}
	}

	public int getNumberStage() {
		return numberStage;
	}

	public void setNumberStage(int numberStage) {
		this.numberStage = numberStage;
	}

	public boolean isLock() {
		return isLock;
	}

	public void setLock(boolean isLock) {
		this.isLock = isLock;
	}

	public TextureRegion getTexture() {
		if(isLock())
			texture = new TextureRegion(Assets.trLock); 
		else
			texture = Assets.trStageLock.get(numberStage - 1); 
		return texture;
	}

	public Rectangle getBounds(){
		return bounds;
	}
}
